import { Controller, Get, Query } from '@nestjs/common';
import { EpgService } from './epg.service';
import { CreateEpgDto, RemoveEpgDto } from './epg.dto';

@Controller('epg')
export class EpgController {
  constructor(private readonly epgService: EpgService) {}

  // 增加入口路径
  @Get('addPath')
  addEpgPath(@Query() query: CreateEpgDto) {
    return this.epgService.addEpgPath(query);
  }

  // 删除入口路径
  @Get('removePath')
  removeEpgPath(@Query() query: RemoveEpgDto) {
    return this.epgService.removeEpgPath(query);
  }

  // 获取入口列表
  @Get('getList')
  getEpgList() {
    return this.epgService.getEpgList();
  }
}
